/*
* @author dumeng
*/
'use strict'
import request from '@/utils/request'

/**
 * 获取分类树形列表
 */
export function getClassifyTree(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/newsClassify/getClassifyTree',
		method: 'POST',
		data
	})
}

/**
 * 字典
 */
export function getDictByCode(dictCode) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/sysDictionary/getDictByCode',
		method: 'POST',
		data: { dictCode }
	})
}

/**
 * 列表查询
 */
export function queryPage(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/queryPage',
		method: 'post',
		data
	})
}

/**
 * 新增
 */
export function insert(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/insert',
		method: 'post',
		data
	})
}

/**
 * 编辑
 */
export function update(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/update',
		method: 'post',
		data
	})
}

/**
 * 详情
 */
export function get(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/get',
		method: 'post',
		data
	})
}

/**
 * 删除
 */
export function del(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/deleteById',
		method: 'post',
		data
	})
}

/**
 * 发布/取消发布
 */
export function updateState(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/release',
		method: 'post',
		data
	})
}
/**
 * 置顶/取消置顶
 */
export function updateIsTop(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/updateIsTop',
		method: 'post',
		data
	})
}

/**
 * 开关修改
 */
export function set(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/switchStatusChange',
		method: 'post',
		data
	})
}

/**
 * 统一修改-评分状态
 */
export function setEvaluateState(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/updateEvaluateState',
		method: 'post',
		data
	})
}

/**
 * 统一修改-点赞状态
 */
export function setFavorState(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/updateFavorState',
		method: 'post',
		data
	})
}

/**
 * 统一修改-评论状态
 */
export function setCommentState(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/updateCommentState',
		method: 'post',
		data
	})
}

/**
 * 评论列表
 */
export function queryPage4comment(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/queryPageComment',
		method: 'post',
		data
	})
}
/**
 * 修改评论状态
 */
export function update4comment(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/updateCommentStatus',
		method: 'post',
		data
	})
}
/**
 * 查看评论祖先
 */
export function queryPage4commentParent(data) {
	return request({
		baseURL: '/API-ENTERPRISE-BACKEND/',
		url: '/backend/info/mmxwjt/queryPageCommentParent',
		method: 'post',
		data
	})
}
